#!/bin/bash

<<'COMMENT'
if [[ $NODE_RANK == 0 ]]; then
    EXT_ARGS="--rdzv_conf=is_host=1"
 else
    EXT_ARGS=""
 fi
COMMENT
NNODES=1
ID=1
MASTER_ADDR=10.121.35.18
MASTER_PORT=29400
PER_NODE=4
DEVICE_IDS=4,5,6,7
IS_DEV=False

CMD="torchrun --standalone --nnodes=$NNODES --nproc_per_node=$PER_NODE main.py --device_ids=$DEVICE_IDS --is_dev=$IS_DEV"
echo $CMD
$CMD
